package IC.Parser;

import java.util.ArrayList;
import java.util.List;

public class ParserMonitor {
	
	public static boolean debugging = false;
	private static List<String> errorsList = null;
	
	public static void init() {
		debugging = false;
		errorsList = null;
	}
	
	
	public static void print(Object output) {
		if (debugging) {
			System.out.println(output);
		}
	}
	
	public static void error(Object output) {
		if (errorsList == null)
			errorsList = new ArrayList<String>();
		errorsList.add(output.toString());
	}
	
	public static boolean hasErrors() {
		return errorsList != null;
	}
	
	public static List<String> getErrors() {
		return errorsList;
	}
	
}
